package org.dromara.trace.domain.bo;

import org.dromara.trace.domain.TraceRecord;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

/**
 * 溯源码查询记录业务对象 trace_record
 *
 * @author Robin
 * @date 2024-12-05
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = TraceRecord.class, reverseConvertGenerate = false)
public class TraceRecordBo extends BaseEntity {

    /**
     * 记录ID
     */
    @NotNull(message = "记录ID不能为空", groups = { EditGroup.class })
    private Long recordId;

    /**
     * 产品ID
     */
    @NotNull(message = "产品ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long sellproId;

    /**
     * 溯源码
     */
    @NotBlank(message = "溯源码不能为空", groups = { AddGroup.class, EditGroup.class })
    private String traceCode;

    /**
     * 查询时间
     */
    @NotBlank(message = "查询时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private String queryDate;

    /**
     * 查询地点
     */
    @NotBlank(message = "查询地点不能为空", groups = { AddGroup.class, EditGroup.class })
    private String queryAddress;

    /**
     * 查询坐标
     */
    @NotBlank(message = "查询坐标不能为空", groups = { AddGroup.class, EditGroup.class })
    private String queryCoordinate;

    /**
     * 查询城市
     */
    @NotBlank(message = "查询城市不能为空", groups = { AddGroup.class, EditGroup.class })
    private String queryCity;

    /**
     * 城市代码
     */
    @NotBlank(message = "城市代码不能为空", groups = { AddGroup.class, EditGroup.class })
    private String cityCode;

    /**
     * 备注
     */
    @NotBlank(message = "备注不能为空", groups = { AddGroup.class, EditGroup.class })
    private String remark;

    /**
     * 状态
     */
    @NotBlank(message = "状态不能为空", groups = { AddGroup.class, EditGroup.class })
    private String status;

    /**
     * 排序
     */
    @NotNull(message = "排序不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long orderNum;


}
